package com.cq.androidtools.flow

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.launch

/**
 * 作者: CQ
 * 日期: 2022-06-10
 * 说明:
 */
class FlowViewModel : ViewModel() {
    val flow = MutableStateFlow("")

    fun initDate() {
        viewModelScope.launch {
            flow.emit("1")
        }
    }
}

